[QC-871] Add log rotate parameters and refactor how we pass the discard file options #1488
Merged
Barthelemy merged 5 commits intoOct 10, 2022
Merged
Conversation
…plosion and add the missing ones
knopers8
approved these changes
Oct 10, 2022
Comment on lines
+30
to
+37
| struct DiscardFileParameters { | ||
| bool debug = false; | ||
| int fromLevel = 21 /* Discard Trace */; | ||
| std::string discardFile; | ||
| unsigned long rotateMaxBytes = 0; | ||
| unsigned int rotateMaxFiles = 0; | ||
| }; | ||
|
|
Collaborator
There was a problem hiding this comment.
as a future improvement, I would propose to move this structure to a separate file, so we do not include QcInfologger header in configuration structures.
Collaborator
Author
There was a problem hiding this comment.
agreed, will do
Comment on lines
+101
to
+104
| discardFileParameters.debug = discardDebugStr == "true"; | ||
| discardFileParameters.fromLevel = config.get<int>("qc.config.infologger.filterDiscardLevel", 21 /* Discard Trace */); | ||
| discardFileParameters.discardFile = config.get<std::string>("qc.config.infologger.filterDiscardFile", ""); | ||
| init(facility, discardFileParameters, dplInfoLogger, dplContext, run, partitionName); |
Collaborator
There was a problem hiding this comment.
why are you not reloading all the parameters?
Collaborator
Author
There was a problem hiding this comment.
good point, will fix.
knopers8
reviewed
Oct 10, 2022
| "The keyword _ID_, if used, is replaced by the device ID.", | ||
| "Discarded Debug messages don't go there."], | ||
| "filterRotateMaxBytes": "", "": "Maximum size of the discard file.", | ||
| "filterRotateMaxFiles": "", "": "Maximum number of discard files." |
Collaborator
There was a problem hiding this comment.
why there could be more than one?
Collaborator
Author
There was a problem hiding this comment.
isn't that how logrotate usually works ? when a file is full it creates a new one, within the limit of the number of files ?
Collaborator
Author
|
as o2-cs8 and o2-dataflow-cs8 have passed, I merged to be able to release |
Barthelemy
added a commit
that referenced
this pull request
Oct 10, 2022
…rd file options (#1488) * [QC-871] Refactor how we pass the discard file options to avoid an explosion and add the missing ones * format * Update CMakeLists.txt * Update SkeletonTask.cxx
ercolessi
pushed a commit
to ercolessi/QualityControl
that referenced
this pull request
Oct 13, 2022
…rd file options (AliceO2Group#1488) * [QC-871] Refactor how we pass the discard file options to avoid an explosion and add the missing ones * format * Update CMakeLists.txt * Update SkeletonTask.cxx
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.